package org.kjtc.service;

import org.kjtc.entity.*;
import org.kjtc.mapper.ProductMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by qwre on 2017/12/5.
 */
@Service
public class ProductService {

    @Autowired
    private ProductMapper productMapper;

    public List<BackLog> getProductModuleID(BackLog backLog) {
        List<BackLog> lists=productMapper.getProductModuleID(backLog);
        return lists;
    }

    public List<BackLog> getDescriptionMsg(BackLog backLog) {
        List<BackLog> lists=productMapper.getDescriptionMsg(backLog);
        return lists;
    }

    public List<BackLog> getVersionDetalisMsg(BackLog backLog) {
        List<BackLog> lists = productMapper.getVersionDetalisMsg(backLog);
        return lists;
    }

    public List<FeedBack> getModuleBackDetalis(FeedBack feedBack) {
        List<FeedBack> lists = productMapper.getModuleBackDetalis(feedBack);
        return lists;
    }

    public int addVersionsMsg(ProductVersion productVersion){
      return  productMapper.addVersionsMsg(productVersion);
    }

    public int delVersionsMsg(ProductVersion productVersion){
      return  productMapper.delVersionsMsg(productVersion);
    }

    public int updateModuleName(Module module){
       return productMapper.updateModuleName(module);
    }

    public int deletModuleID(Module module){
       return productMapper.deletModuleID(module);
    }

    public int addBackLogMsgSure(BackLog backLog){
        return productMapper.addBackLogMsgSure(backLog);
    }

    public int addFeedBackMsgSure(FeedBack feedBack){
        return productMapper.addFeedBackMsgSure(feedBack);
    }

    public int updateVersionsMsg(ProductVersion productVersion){
        return productMapper.updateVersionsMsg(productVersion);
    }

    public int saveNewProject(Product product){
        return productMapper.saveNewProject(product);
    }

    public int addModuleID(Module module){
        return productMapper.addModuleID(module);
    }

    public List<Sprint> getAllSprint(String productVersionID){
        List<Sprint> list=productMapper.getAllSprint(productVersionID);
        return  list;
    }
    public int deleteProduct(String productID){ return productMapper.deleteProduct(productID);}

    public int doUpdateProductName(Product product){ return productMapper.doUpdateProductName(product);}

}
